package com.dhecp.project.business.service;

import java.util.List;
import java.util.Map;

import com.dhecp.common.core.domain.AjaxResult;
import com.dhecp.project.business.domain.FbaPlanOrder;
import com.dhecp.project.business.domain.FbaPlanOrderDetail;
import com.dhecp.project.business.domain.FbaProductActive;

/**
 * 头程计划单  业务层
 * @Author fxz
 * @Date 2022/9/23
 */
public interface FbaPlanOrderService {
    /**
     * 查询头程计划单
     * @param params
     * @Author: fxz
     * @date: 2022/9/22
     */
    List<FbaPlanOrder> queryList(Map<String, Object> params) throws Exception;
    
    List<FbaPlanOrderDetail> querySonList(Map<String, Object> params) throws Exception;
    
    List<FbaPlanOrderDetail> queryFbaPlanOrderDetailByCode(String code);
    
    FbaPlanOrderDetail queryFbaPlanOrderDetailByGuid(String guid);

    /**
     * 新增头程计划单
     * @author fxz
     * @date: 2022-09-22 10:53
     */
    AjaxResult insertFbaPlanOrder(Map<String, Object> params);

    /**
    *@Description: 查询指定单nid的首记录
    *@Param: [params]
    *@return: com.dhecp.project.purchase.domain.PurchasePlan
    *@Author: hlf
    *@date: 2022-08-15 15:41
    */
    FbaPlanOrder queryFirstRecord(Map<String, Object> params) throws Exception;

    /**
     *@Description: 保存
     *@Param: [params]
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-08-15 15:41
     */
    AjaxResult saveData(Map<String, Object> params);

    /**
     *@Description: 流转  —— 添加流程任务、修改流程状态及生效标志
     *@Param: infoMap 必要参数：非网格字段（包括头部、底部所有显示和隐藏的字段）
     *@Param: infoItems 必要参数：对应实体类的json格式字符串（仅需 guid）
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-05-09 9:42
     */
    AjaxResult updateFlowGo(Map<String, Object> params);

    /**
     *@Description: 退回  —— 添加流程任务、修改流程状态及生效标志
     *@Param: infoMap 必要参数：非网格字段（包括头部、底部所有显示和隐藏的字段）
     *@Param: infoItems 必要参数：对应实体类的json格式字符串（仅需 guid）
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-05-09 9:44
     */
    AjaxResult updateFlowBack(Map<String, Object> params);

    /**
     *@Description: 删除数据
     *@Param: guid 唯一标识
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-08-17 14:56
     */
    AjaxResult delete (Map<String, Object> params);

    /**
     *@Description: 查询前一单NID、BID
     *@Param: nid 必要参数：当前 单据编码
     *@return: AjaxResult (data.nid 前一单NID， data.bid 前一单BID)
     *@Author: hlf
     *@date: 2022-05-09 9:35
     */
    AjaxResult queryLastNid(Map<String, Object> params) throws Exception;

    /**
     *@Description: 查询后一单NID、BID
     *@Param: nid 必要参数：当前 单据编码
     *@return: AjaxResult (data.nid 后一单NID， data.bid 后一单BID)
     *@Author: hlf
     *@date: 2022-05-09 9:40
     */
    AjaxResult queryNextNid(Map<String, Object> params) throws Exception;

    /**
     *@Description: 修改审核状态
     *@Param: guid 唯一标识
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-08-17 14:56
     */
    AjaxResult updateState(Map<String, Object> params);


    /**
     * 查询库存商品库
     * @param params
     * @return List - ProductActive
     * @throws Exception
     * @author DH-Xxj
     */
    List<FbaProductActive> queryFbaProductActive(Map<String, Object> params) throws Exception;

}
